package com.hayrullah.cinema.entity;

import java.util.HashSet;
import java.util.Set;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.Table;

@Entity
@Table(name = "Seats_Table")
public class Seats extends AbstractEntity {

	
	/**
	 * 
	 */
	private static final long serialVersionUID =1L;
	private Integer seatnumber;
	private String seathall;
	@ManyToMany(cascade = CascadeType.ALL)
	@JoinTable(name = "Saloon_seat", joinColumns = { @JoinColumn(name = "Saloon_id") }, inverseJoinColumns = { @JoinColumn(name = "Seat_id") })
	private Set<Saloon> saloons;
	
	public Seats() {
		this.saloons = new HashSet<Saloon>();
	}

	@Column(name = "Seat_hall", nullable = false)
	public String getSeathall() {
		return seathall;
	}

	@Column(name = "Seat_hall", nullable = false)
	public Integer getSeatnumber() {
		return seatnumber;
	}

	public void setSeatnumber(Integer seatnumber) {
		this.seatnumber = seatnumber;
	}

	public void setSeathall(String seathall) {
		this.seathall = seathall;
	}
	public Set<Saloon> getSaloons() {
		return saloons;
	}

	public void setSaloons(Set<Saloon> saloons) {
		this.saloons = saloons;
	}



	
}
